package com.star.sso.repository.model;

import com.star.common.core.contract.BaseRepository;
import com.star.common.core.contract.Model;
import com.star.sso.repository.service.SysMenuRepository;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.time.LocalDateTime;

/**
 * 菜单权限表(SysMenu)领域类
 *
 * @author zhouhengzhe
 * @since 2024-01-08 23:53:37
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@EqualsAndHashCode(callSuper = true)
public class SysMenuBO extends Model {

    @Schema(description = "菜单ID（主键ID）")
    private String id;
    @Schema(description = "创建时间")
    private LocalDateTime createTime;
    @Schema(description = "更新时间")
    private LocalDateTime updateTime;
    @Schema(description = "创建人编码")
    private String createBy;
    @Schema(description = "创建人")
    private String creator;
    @Schema(description = "更新人编码")
    private String updateBy;
    @Schema(description = "更新人")
    private String updater;
    @Schema(description = "菜单名称")
    private String name;
    @Schema(description = "前端URL")
    private String path;
    @Schema(description = "父菜单ID")
    private String parentId;
    @Schema(description = "图标")
    private String icon;
    @Schema(description = "排序值")
    private Integer sort;
    /**
     * @see com.star.sso.contract.enums.MenuTypeEnum
     */
    @Schema(description = "菜单类型 (1目录 2菜单 3按钮)")
    private Integer type;
    @Schema(description = "授权标识")
    private String perms;

    public static SysMenuRepository repository() {
        return BaseRepository.of(SysMenuBO.class);
    }
}
